package org.jsola.hr.dto;

import lombok.Data;
import lombok.EqualsAndHashCode;
import org.jsola.core.dto.BaseDTO;
import org.jsola.hr.vo.SalaryPlanVO;

import java.lang.reflect.Field;
import java.util.*;

/**
 * @author meng
 * 工资计算实体类
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class EmployeeForSalaryDTO extends BaseDTO {
    private   String name;
    private   int age;
    private   int sex;
    private   int workAge;
    private List<SalaryPlanVO> salaryPlanVOList;

    public  Map<String,Object> getParams() throws IllegalAccessException {
        Map<String,Object> map=new HashMap<>();
        Field[] fields =this.getClass().getDeclaredFields();
       for ( Field field:fields){
           map.put(field.getName(),field.get(this));
       }
      return  map;
    }
}
